package com.t309.tzy.service;
import com.t309.tzy.entity.TSysUser;
import com.t309.tzy.utils.PageSupport;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface ITsysUserService {

    int login(@Param("account") String account, @Param("password") String password);

    List<TSysUser> getAllUsers();

    List<TSysUser> getAllUsersByPage(@Param("currentNo")int currentNo,@Param("pageSize")int pageSize);

    TSysUser getUserInfoById(int id);

    int getUserIdByAccount(String account);

    public Integer getUserCount(@Param("realName")String realName, @Param("roleId") Integer roleId);

    List<TSysUser> getUserListPagingByRealNameAndRoleId(@Param("realName")String realName,
                                                         @Param("roleId")Integer roleId,
                                @Param("pageSupport") PageSupport pageSupport);

    List<TSysUser> getUserListByRoleId(int roleId);

    List<TSysUser> getUserListByRoleIdArray(Integer[] roleIds);

    List<TSysUser> getUserListByRoleIdList(List<Integer> roleList);

    //public int insert(List<TSysUser> userList);
    public int insert(TSysUser user);

    public int insertMultiple(List<TSysUser> userList);

    public int update(TSysUser user);

    boolean updateUserPassword(@Param("id")int id,@Param("newPassword")String newPassword);

    public int delete(int id);

}
